import Vue from 'vue'
import Router from 'vue-router'
import Test from '@/page/test'
import Test1 from '@/page/test1'
import Login from '@/page/login'
import Admin from '@/page/admin'
import Index from '@/page/index'
import ListUser from '@/page/listUser'
import ListRole from '@/page/listRole'
import ListMenu from '@/page/listMenu'
import EditMenu from '@/page/editMenu'
import AddMenu from '@/page/addMenu'
import AddRole from '@/page/addRole'
import EditRole from '@/page/EditRole'
import AddUser from '@/page/addUser'
import EditUser from '@/page/editUser'
import Pwd from '@/page/pwd'
import AssignPermissions from '@/page/assignPermissions'
import ListLog from '@/page/listLog'
import ListCat from '@/page/listCat'
import AddCat from '@/page/addCat'
import EditCat from '@/page/editCat'
import ListArt from '@/page/listArt'
import AddArt from '@/page/addArt'
import EditArt from '@/page/editArt'
import ListModel from '@/page/listModel'
import AddModel from '@/page/addModel'
import EditModel from '@/page/editModel'
import ListField from '@/page/listField'
import AddField from '@/page/addField'
import EditField from '@/page/editField'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/test',
      name: 'test',
      component: Test
    },
    {
      path: '/test1',
      name: 'test1',
      component: Test1
    },
    {
      path: '/',
      name: 'login',
      component: Login
    },
    {
    	path: '/admin/',
    	component: Admin,
      children: [
        { 
          path: '',
          name: 'index',
          component: Index
        }, {
          path: 'listUser',
          name: 'listUser',
          component: ListUser
        }, {
          path: 'listRole',
          name: 'listRole',
          component: ListRole
        }, {
          path: 'listMenu',
          name: 'listMenu',
          component: ListMenu
        }, {
          path: 'editMenu',
          name: 'editMenu',
          component: EditMenu
        }, {
          path: 'addMenu',
          name: 'addMenu',
          component: AddMenu
        }, {
          path: 'addRole',
          name: 'addRole',
          component: AddRole
        }, {
          path: 'editRole',
          name: 'editRole',
          component: EditRole
        }, {
          path: 'addUser',
          name: 'addUser',
          component: AddUser
        }, {
          path: 'editUser',
          name: 'editUser',
          component: EditUser
        }, {
          path: 'pwd',
          name: 'pwd',
          component: Pwd
        }, {
          path: 'assignPermissions',
          name: 'assignPermissions',
          component: AssignPermissions
        }, {
          path: 'listLog',
          name: 'listLog',
          component: ListLog
        }, {
          path: 'listCat',
          name: 'listCat',
          component: ListCat
        }, {
          path: 'listArt',
          name: 'listArt',
          component: ListArt
        }, {
          path: 'addCat',
          name: 'addCat',
          component: AddCat
        }, {
          path: 'editCat',
          name: 'editCat',
          component: EditCat
        }, {
          path: 'addArt',
          name: 'addArt',
          component: AddArt
        }, {
          path: 'editArt',
          name: 'editArt',
          component: EditArt
        }, {
          path: 'listModel',
          name: 'listModel',
          component: ListModel
        }, {
          path: 'addModel',
          name: 'addModel',
          component: AddModel
        }, {
          path: 'editModel',
          name: 'editModel',
          component: EditModel
        }, {
          path: 'listField',
          name: 'listField',
          component: ListField
        }, {
          path: 'addField',
          name: 'addField',
          component: AddField
        }, {
          path: 'editField',
          name: 'editField',
          component: EditField
        }
      ]
    }
  ]
})
